/*  SSXMLParser.h
 *  MESLib
 * 
 * Copyright 2003-2009 Starline Software Ltd
 * 
 * This file is part of MESLib.
 * 
 * MESLib is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MESLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with MESLib. If not, see <http://www.gnu.org/licenses/>.
 */
//  Created by Tobias Haughton on Tue Jan 21 2003.
//  Copyright (c) 2003 Startline Software. All rights reserved.
// 

#import <Foundation/Foundation.h>
#import "SSEventObject.h"
#import "SSChartDate.h"
#import "SSNeedsDiamond.h"
#import "SSDiamondOption.h"
#import "SSDiamondTradeoff.h"
#import "SSPoisonWord.h"
#import "SSConst.h"

@class SSCatalystComment;

@interface SSXMLParser : NSObject {

}

- (NSMutableDictionary *)dictionaryWithStructureXMLData:(NSData *)data fileName:fileName actorOrderArray:(NSMutableArray **)orderArray successful:(BOOL *)success;
- (SSEventObject *)eventObjectWithEventXMLData:(NSData *)data address:(NSString *)address label:(NSNumber *)label xPosition:(NSNumber *)xPosition successful:(BOOL *)success;

- (NSMutableArray *)referencedEventBlockArrayFromXMLString:(NSString *)xmlString;
- (NSMutableDictionary *)referencedEventDictionaryFromString:(NSString *)eventString;

- (void)addActorOrderFromString:(NSString *)xmlString toArray:(NSMutableArray **)orderArray;
- (NSMutableDictionary *)actorOrderDictionaryFromString:(NSString *)orderString;

- (NSMutableArray *)diamondArrayFromXMLData:(NSData *)data;
- (SSNeedsDiamond *)diamondObjectFromXMLString:(NSString *)xmlString;

- (NSString *)stringFromXMLString:(NSString *)xmlString openTag:(NSString *)openTag closeTag:(NSString *)closeTag;

- (NSMutableArray *)commentArrayFromXMLString:(NSString *)xmlString;
- (SSCatalystComment *)commentObjectFromString:(NSString *)commentString;

- (NSNumber *)labelFromString:(NSString *)string;

- (NSNumber *)xPositionFromString:(NSString *)string;
- (NSNumber *)yPositionFromString:(NSString *)string;

- (SSChartDate *)ssChartDateFromXMLString:(NSString *)xmlString openTag:(NSString *)openTag closeTag:(NSString *)closeTag;
- (NSCalendarDate *)chartDateFromXMLString:(NSString *)xmlString;

- (NSMutableArray *)linkArrayFromXMLString:(NSString *)xmlString;
- (NSMutableDictionary *)linkDictionaryFromString:(NSString *)linkString;

- (NSNumber *)closestEventXOffsetFromString:(NSString *)string;
- (NSNumber *)closestEventYOffsetFromString:(NSString *)string;

- (NSMutableArray *)diamondOptionArrayFromXMLString:(NSString *)xmlString;
- (SSDiamondOption *)diamondOptionObjectFromString:(NSString *)xmlString;
- (NSMutableArray *)diamondTradeoffArrayFromXMLString:(NSString *)xmlString;

- (float)actorColumnWidthFromXMLString:(NSString *)xmlString;

- (int)displayModeFromXMLString:(NSString *)xmlString;
- (float)overlapUnitFromXMLString:(NSString *)xmlString;
- (float)overlapPixelsPerUnitFromXMLString:(NSString *)xmlString;

- (NSMutableArray *)poisonWordArrayFromXMLString:(NSString *)xmlString;
- (SSPoisonWord *)poisonWordObjectFromString:(NSString *)poisonWordString;

int sortActorOrderArray(NSMutableDictionary *obj1, NSMutableDictionary *obj2, void *context );

@end
